<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <title>厅干部平时考核管理系统</title>
    <link rel="stylesheet" type="text/css" href="<c:url value='/resource/jxkh/css/main.css'/>"/>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/jquery-1.11.0.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/layer/layer.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/jeDate/jedate.js'/>"></script>
</head>
<body>
<div class="njga" style="overflow: hidden;" >
    <div class="bmkhcp" style="padding: 22px;background: #fff;overflow: hidden;">
        <div class="bmkhcp_row">
            <div class="bmkhcp_lf" style="width: 100%;">
                <div class="title">我的自评</div>
                <div class="khzpzp_row khzpzp_row1">
                    <c:choose>
                        <c:when test="${type==1}">
                            <div class="p_text">季度</div>
                            <div class="zp_select">
                                <input type="text" placeholder="选择季度" class="inpt1"/>
                                <div class="arrow_down"></div>
                            </div>
                        </c:when>
                        <c:otherwise>
                            <div class="p_text">月份</div>
                            <div class="zp_select">
                                <input type="text" placeholder="选择月份" id="dateinfo" class="inpt1"/>
                                <div class="arrow_down"></div>
                            </div>
                        </c:otherwise>
                    </c:choose>
                    <button class="btn btn1">查询</button>
                    <button class="btn btn2">重置</button>

                    <div class="xzzb_add" onclick="addData()"><span>+</span>
                        <c:choose>
                            <c:when test="${type==1}">
                                季度自评
                            </c:when>
                            <c:otherwise>
                                月度自评
                            </c:otherwise>
                        </c:choose>
                    </div>
                    <div class="xzzb_add" style="margin-right: 20px;" onclick="gotoSycj()">我的上月成绩
                    </div>
                </div>
                <table class="wdzb_table wdzb_table1">
                    <tr>
                        <th width="10%">
                            <c:choose>
                                <c:when test="${type==1}">
                                    季度
                                </c:when>
                                <c:otherwise>
                                    月份
                                </c:otherwise>
                            </c:choose>
                        </th>
                        <th width="10%">德</th>
                        <th width="10%">能</th>
                        <th width="10%">勤</th>
                        <th width="10%">绩</th>
                        <th width="10%">廉</th>
                        <th width="10%">请假</th>
                        <th width="10%">迟到</th>
                        <th width="10%">早退</th>
                        <th width="10%">缺勤</th>
                    </tr>
                    <c:forEach var="item" items="${list }">
                        <tr>
                            <c:if test="${item.type==1}">
                                <td>${item.months }季度</td>
                            </c:if>
                            <c:if test="${item.type!=1}">
                                <td>${item.months }月</td>
                            </c:if>
                            <td>${item.selflevel1}</td>
                            <td>${item.selflevel2}</td>
                            <td>${item.selflevel3}</td>
                            <td>${item.selflevel4}</td>
                            <td>${item.selflevel5}</td>
                            <td>${item.leave}</td>
                            <td>${item.late}</td>
                            <td>${item.earlier}</td>
                            <td>${item.absenteeism}</td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
        </div>

    </div>
</div>

<script type="text/javascript">
    jeDate({
        dateCell: "#dateinfo",
        format: "YYYY-MM"
    });
    //领导评鉴-选择分数
    $(document).click(function () {
        $(".td_select_xl").slideUp(200);
    });
    $(".td_select1").click(function (e) {
        e = e || window.event;
        if (e.stopPropagation) {
            e.stopPropagation();
        } else {
            e.cancelBubble = true;
        }
        $(this).next(".td_select_xl").slideToggle(200);
        $(this).parents("tr").siblings("tr").find(".td_select_xl").hide();
        var selecttext = $(this).children("p");
        var selectmain = $(this).next(".td_select_xl");
        var lis = selectmain.find('li');
        for (var i = 0; i < lis.length; i++) {
            lis[i].onclick = function () {
                selectmain.hide();
                var textval = $(this).html();
                selecttext.text(decodeURIComponent(textval));
            }
        }
    });
    //领导评鉴-选择分数结束
    function addData() {
        var url = "<c:url value='/jump/khcp_zp.html'/>";
        $('#ifrm_data', parent.document).attr("src", url);
    }
    function gotoSycj(){
        var url = "<c:url value='/jump/khjg.html'/>";
        $('#ifrm_data', parent.document).attr("src", url);
    }
</script>
</body>

</html>